﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleTestFrameForNFC
{
    class TestItem
    {
        private int ecCode;
        private string desc;
        private double lowerLimit;
        private double value;
        private double upperLimit;
        private int result = -1;

        /**
         * 通过0，未通过1
         */
        public TestItem(int ECCode, string desc, double lowerLimit, double value, double upperLimit) {
            if (value > upperLimit || value < lowerLimit)
            {
                this.result = 1;
            }
            else {
                this.result = 0;
            }
            this.ecCode = ECCode;
            this.desc = desc;
            this.lowerLimit = lowerLimit;
            this.value = value;
            this.upperLimit = upperLimit;
        }

        public int ECCode { get => ecCode; set => ecCode = value; }
        public string Desc { get => desc; set => desc = value; }
        public double LowerLimit { get => lowerLimit; set => lowerLimit = value; }
        public double Value { get => value; set => this.value = value; }
        public double UpperLimit { get => upperLimit; set => upperLimit = value; }
        public int Result { get => result; set => result = value; }
    }
}
